<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>

<body>
    <div id="app">
        <div v-if="!isPuppet">
            <h3>连接好友：</h3>
            <el-form :label-position="labelPosition" label-width="80px" :model="form">
                <el-form-item label="序列号">
                  <el-input v-model="form.number"></el-input>
                </el-form-item>
                <el-form-item label="密码">
                  <el-input v-model="form.pwd"></el-input>
                </el-form-item>
            </el-form>
            <el-button @click="connect">连接</el-button>
        </div>
       
        <div v-else>
            <div>
                <h2>您的序列号：{{number}}</h2>
                <h2>您的密码：{{pwd}}</h2>
            </div>
            <p>分享给好友，好友给你提供远程帮助！</p>
            <el-button @click="changeRole">连接好友</el-button>
        </div>
       
        <form>
            <textarea id="incoming"></textarea>
            <button type="submit">submit</button>
        </form>
        <pre id="outgoing"></pre>
    </div>
    <!-- <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script> -->
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <script src="./socket.io.js"></script>
    <script src="./simplepeer.min.js"></script>
    <script src="./index.js"></script>
</body>

</html>